﻿using System;

namespace SmartSiteManagementSystem.Models.Admin
{
    [Serializable]
    public class AdminPageBtnInfo
    {
        #region Model
        private int _btnId;
        private string _clientid;
        private int _btntype;
        private string _btnname;
        private string _relurl;
        private int _sortno;
        private bool _stopflag = false;
        private bool _deleteflag = false;
        private int _adminmenuid;
        private DateTime _createtime = DateTime.Now;
        private string _createman;
        /// <summary>
        /// 自增长标识
        /// </summary>
        public int BtnId
        {
            set { _btnId = value; }
            get { return _btnId; }
        }
        /// <summary>
        /// 客户端ID；页面中的ID，可以是ID前面一部分
        /// </summary>
        public string ClientId
        {
            set { _clientid = value; }
            get { return _clientid; }
        }
        /// <summary>
        /// 类型；0.按钮1.筛选条件
        /// </summary>
        public int BtnType
        {
            set { _btntype = value; }
            get { return _btntype; }
        }
        /// <summary>
        /// 名称或说明
        /// </summary>
        public string BtnName
        {
            set { _btnname = value; }
            get { return _btnname; }
        }
        /// <summary>
        /// 关联URL
        /// </summary>
        public string RelUrl
        {
            set { _relurl = value; }
            get { return _relurl; }
        }

        public string[] RelList
        {
            get
            {
                string[] sp = { "|&&|" };
                string sRelUrl = RelUrl ?? "";
                string[] sr = sRelUrl.Split(sp, StringSplitOptions.RemoveEmptyEntries);
                if (sr.Length == 0)
                {
                    sr = new string[] { "" };
                }
                return sr;
            }
        }
        /// <summary>
        /// 排序
        /// </summary>
        public int SortNo
        {
            set { _sortno = value; }
            get { return _sortno; }
        }
        /// <summary>
        /// 停用标识
        /// </summary>
        public bool StopFlag
        {
            set { _stopflag = value; }
            get { return _stopflag; }
        }
        /// <summary>
        /// 删除标识
        /// </summary>
        public bool DeleteFlag
        {
            set { _deleteflag = value; }
            get { return _deleteflag; }
        }
        /// <summary>
        /// 对应菜单ID
        /// </summary>
        public int AdminMenuId
        {
            set { _adminmenuid = value; }
            get { return _adminmenuid; }
        }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime
        {
            set { _createtime = value; }
            get { return _createtime; }
        }
        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateMan
        {
            set { _createman = value; }
            get { return _createman; }
        }

        #endregion Model
    }
}
